import { defHttp } from '/@/utils/http/axios';
// import { getMenuListResultModel } from './model/menuModel';

enum Api {
  RECV = '/msg/msg/recv/',
  SiteLatestMsg = '/msg/msg/getSiteLatestMsg',
  Count = '/msg/msg/getSiteUnReadCount',
  GetOwnPage = '/msg/msg/getOwnPage',
  OneClickRead = '/msg/msg/batchrecvAll',
}

// 消息设置为已读取
export const RECVApi = (id: string) => {
  return defHttp.post<any>({ url: Api.RECV + id });
};
export const getOwnPageApi = (params: Indexable) => {
  return defHttp.get<any>({ url: Api.GetOwnPage, params });
};

export const getCountMsgApi = () => {
  return defHttp.get<any>({ url: Api.Count });
};

// 一键已读
export const setOneClickRead = () => {
  return defHttp.post<any>({ url: Api.OneClickRead });
};
